<template>
	<view class="box" :style="theme">
		<!-- 支付状态 -->
		<view class="box_status">
			<view class="box_status_zt">
				<image v-if="info.status == 0" :src="imgHost+'/dingpiao_ic_daiquhuo.png'"></image>
				<image v-if="info.status == 1" :src="imgHost+'/dingpiao_ic_yiquhu.png'"></image>
				<text v-if="info.status == 0">待取货</text>
				<text v-if="info.status == 1">已取货</text>
			</view>
		</view>
		<!-- 订单信息 -->
		<view class="box_xx">
			<view class="box_xx_title">订单信息</view>
			<text>商品名称：{{info.name}}</text>
			<text>兑换时间：{{info.createTime}}</text>
			<text v-if="info.pickupTime">取货时间：{{info.pickupTime}}</text>
			<text>兑换积分：{{info.price || 0}}</text>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				noClick: true,
				id: '',
				info: {},
			}
		},
		onLoad(ops) {
			this.id = ops.id || ''
			this.getDetail()
			
		},
		methods: {
			jump(url, params, a) {
				this.$app.jump(url, params, a);
			},
			jump2(url, params, a) {
				this.$app.jump2(url, params, a);
			},
			getDetail() {
				this.$app.ajax({
					api: this.$api.goodsOrderMemberDetail(),
					data: {
						param: {
							id: this.id
						}
					}
				}).then((res) => {
					if (res.errorCode === '000000') {
						this.info = res.recordList[0]
					} else {
						setTimeout(() => {
							uni.navigateBack({
								delta: 1
							})
						}, 500)
					}
				}).catch(() => {})
			}

		}

	}
</script>
<style>
	page {
		background: #fff;
	}
</style>
<style scoped lang="scss">
	.box_status {
		padding: 30rpx;
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background: #ffffff;
		.box_status_zt {
			display: flex;
			align-items: center;
			flex-direction: column;
			image {
				width: 140rpx;
				height: 140rpx;
			}
			text {
				&:nth-child(2) {
					font-size: 34rpx;
					font-weight: 500;
					color: #222222;
					margin-top: 20rpx;
				}
			
				&:nth-child(3) {
					font-size: 28rpx;
					font-weight: 400;
					color: $color;
					margin-top: 20rpx;
				}
			}
		}
	}


	.box_xx {
		padding: 30rpx;
		box-sizing: border-box;
		margin-top: 24rpx;
		background: #ffffff;
		display: flex;
		flex-direction: column;
		.box_xx_title {
			font-size: 32rpx;
			font-weight: 500;
			color: #222222;
		}
		text {
			font-size: 24rpx;
			font-weight: 400;
			color: #333333;
			margin-top: 20rpx;
		}
	}
</style>
